4  Final Combined Database

After reconciling all column names across the 3 datasets, standardizing age group, race/ethnicity, and infection date variables, we merge them together to generate a final, complete database and begin our descriptive explorations and analyses.

Code
step2_ca_df <- read.csv(file = here("_milestones/03_milestone/step2_tbl_outputs/step2_ca_df.csv"))
step2_la_cnty_df <- read.csv(file = here("_milestones/03_milestone/step2_tbl_outputs/step2_la_cnty_df.csv"))
step2_pop_df <- read.csv(file = here("_milestones/03_milestone/step2_tbl_outputs/step2_pop_df.csv"))


combined_df <- rbind(step2_ca_df, step2_la_cnty_df) %>%
  relocate(health_officer_region,  .after = county) %>%
  relocate(pop, .after = race_long) %>%
  mutate(age_cat = factor(age_cat, levels = c("0-17", "18-49", "50-64", "65+")))
Code
# final cleaned dataframes stored in "_data/cleaned_data/" directory

#--write.csv(combined_df, file = here("_data/cleaned_data/combined_df.csv"), row.names = FALSE)
#--write.csv(ca_df, file = here("_data/cleaned_data/cleaned_ca_df.csv"), row.names = FALSE)
#--write.csv(la_cnty_df, file = here("_data/cleaned_data/cleaned_la_cnty_df.csv"), row.names = FALSE)
#--write.csv(pop_df, file = here("_data/cleaned_data/cleaned_pop_df.csv"), row.names = FALSE)